package ru.sgu.acm.judge.impl;

import org.apache.log4j.Logger;
import ru.sgu.acm.misc.Constants;
import ru.sgu.acm.model.Submit;

/**
 * Always return accepted result for submit.
 *
 * @author Vitaly Goldshteyn (VitalyGoldstein@gmail.com)
 */
public class OkJudge extends AbstractJudge {
    private static final Logger logger = Logger.getLogger(OkJudge.class);
    public void judge(Submit submit) {
        logger.info("Judging submit " + submit.getId());
        logger.debug("\tsource is " + submit.getSource());
        super.judge(submit);
        submit.setAccepted(1);
        submit.setStatus(Constants.getAcceptedStatus());
    }
}
